package com.infolab.aims.common;

import org.apache.commons.lang.builder.ToStringStyle;

public class SpecialToStringStyle extends ToStringStyle {
	
	public static final ToStringStyle SPECIAL_STYLE = new SpecialToStringStyle();
	public static final String SPECIAL_SEPARATE = "|_|";

    /**
     * <p>Constructor.</p>
     *
     * <p>Use the static constant rather than instantiating.</p>
     */
    private SpecialToStringStyle() {
        super();
        this.setUseShortClassName(true);
        this.setUseIdentityHashCode(false);
        this.setContentStart("[");
        this.setFieldSeparator(SPECIAL_SEPARATE);
        this.setFieldSeparatorAtStart(false);
        this.setContentEnd("]");
    }

    /**
     * <p>Ensure <code>Singleton</code> after serialization.</p>
     *
     * @return the singleton
     */
    private Object readResolve() {
        return ToStringStyle.MULTI_LINE_STYLE;
    }

}
